package com.blogWebAutoTest.common;

import org.openqa.selenium.chrome.ChromeDriver;

import java.time.Duration;

public class AutoTestUtils {
    public static ChromeDriver driver;

    // 创建驱动对象
    public static ChromeDriver createDriver() {
        if (driver == null) {
            driver = new ChromeDriver();
            // 创建隐式等待
            driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
        }
        return driver;
    }
}
